<?php
require 'config.php';
$generate_time = microtime_float();
ob_clean();
$iNews = getValue('iNews');
$iType = getValue('iType','str','GET','news');
switch($iType) {
case 1: 
    $type = 'news';
    $name = 'Tin tức';
    $rewrite = 'tin-tuc';
    break;
case 2: 
    $type = 'recruitment';
    $name = 'Tuyển dụng';
    $rewrite = 'tuyen-dung';
    break;
case 3: 
    $type = 'promotion';
    $name = 'Khuyến mại';
    $rewrite = 'khuyen-mai';
    break;
case 4: 
    $type = 'technology';
    $name = 'Góc kỹ thuật';
    $rewrite = 'goc-ky-thuat';
    break;
default:
    $type = 'news';
    $name = 'Tin tức';
    $rewrite = 'tin-tuc';
    break;
}
$NewsController = new NewsController($iNews);
?>
<?=$NewsController->loadHeader()?>
<body>
    <div class="top_header">
        <? include '../includes/inc_top_header.php'?>
    </div><!-- End top_header -->
    <div class="container">
        <div class="wrap_container">
            <? include '../includes/inc_header.php'?>
            <? include '../includes/inc_nav.php'?>
            <? include '../includes/inc_featured.php'?>
            <? include '../includes/inc_news_detail.php'?>
        </div><!-- End wrap_container -->
    </div><!-- End container -->
    <? include '../includes/inc_footer.php'?>
    <? include '../includes/inc_ads.php'?>
</body>
<?=$NewsController->loadFooter($generate_time)?>
